<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.mstore.pojo.Broadcast"%>
<%
	request.setCharacterEncoding("UTF-8");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html>
	<head>
		<title>修改消息</title>
		<%@include file="/collect/meta.jsp"%>
		<link rel="stylesheet" href="${ctx }/css/radius.css" type="text/css"></link>
		<link rel="stylesheet" href="${ctx }/css/broadcast.css" type="text/css"></link>
		<link rel="stylesheet" href="../themes/default/default.css" />
		<link rel="stylesheet" href="../plugins/code/prettify.css" />
		<script charset="utf-8" src="../kindeditor.js"></script>
		<script charset="utf-8" src="../lang/zh_CN.js"></script>
		<script charset="utf-8" src="../plugins/code/prettify.js"></script>
		<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
		<script>
	KindEditor.ready(function(K) {
		var editor1 = K.create('textarea[name="broadcast.context"]', {
			cssPath : '../plugins/code/prettify.css',
			uploadJson : '../jsp/upload_json.jsp',
			fileManagerJson : '../jsp/file_manager_json.jsp',
			allowFileManager : true,
			afterCreate : function() {
				var self = this;
				K.ctrl(document, 13, function() {
					self.sync();
					document.forms['example'].submit();
				});
				K.ctrl(self.edit.doc, 13, function() {
					self.sync();
					document.forms['example'].submit();
				});
			}
		});
		prettyPrint();
	});
</script>
	</head>
	<body lang="zh-cn">
		<div class="wrapper">
			<c:import url="/collect/top.jsp"></c:import>
			<div class="main-container" id="main-container">
				<div class="main-container-inner">
					<c:import url="/collect/left.jsp"></c:import>
					<div class="main-content">
						<div class="breadcrumbs" id="breadcrumbs">
							<ul class="breadcrumb">
								<li>
									<i class="icon-home home-icon"></i><a
								href="broadcastaction!getBroadcastByPage">消息管理</a>
								</li>
								<li>
									修改消息
								</li>
							</ul>
							<!-- .breadcrumb -->
						</div>
						<div class="page-content">
							<div class="row">
								<div class="col-xs-12">
									<!-- PAGE CONTENT BEGINS -->
									<form name="example" method="post" class="form-horizontal"
										action="broadcastaction!modifyBroadcast">
										<%
											Broadcast b = (Broadcast) session
													.getAttribute("broadcast");
										%>
										<br />
										<div class="col-md-offset-2">
										<div class="form-group">
											<label for="title" class="col-xs-2 col-sm-1 col-md-1 lab">标题:</label>
											<div class="col-xs-9 col-sm-6 col-md-10">
												<input type="text" name="broadcast.title" id="title" class="form-control"
													value="<%=b.getTitle() %>">
											</div>
										</div>
										<input type="hidden" name="broadcast.id" value="<%=b.getId() %>">
										<br />
										<div class="form-group">
											<label class="col-xs-2 col-sm-1 col-md-2 lab">内容:</label>
											<div class="col-xs-9 col-sm-6 col-md-10">
												<textarea name="broadcast.context" class="form-control">
						            				<%=b.getContext() %>
						                        </textarea>
					                        </div>
										</div>
										<br />
										<div id="btn-team">
											<input type="submit" name="button" value="保存"
												class="btn btn-primary radius" />
											<a class="btn btn-primary radius"
												href="broadcastaction!getBroadcastByPage?index=1">返回</a>
										</div>
									</div>
									</form>
									<!-- PAGE CONTENT ENDS -->
								</div>
								<!-- /.col -->
							</div>
							<!-- /.row -->
						</div>
						<!-- /.page-content -->
					</div>
					<!-- /.main-content -->
				</div>
				<!-- /.main-container-inner -->
				<a href="#" id="btn-scroll-up"
					class="btn-scroll-up btn btn-sm btn-inverse"
					style="position: fixed; bottom: 0;"> <i
					class="icon-double-angle-up icon-only bigger-110"></i> </a>
			</div>
			<!-- /.main-container -->
			<div class="push"></div>
		</div>
		<c:import url="/collect/down.jsp"></c:import>
	</body>
	<script type="text/javascript">
		$('.xiaoxi > a').css("color","red");
	</script>
</html>
<%!private String htmlspecialchars(String str) {
		str = str.replaceAll("&", "&amp;");
		str = str.replaceAll("<", "&lt;");
		str = str.replaceAll(">", "&gt;");
		str = str.replaceAll("\"", "&quot;");
		return str;
	}%>